package com.hzit.mmcb.core.controller.admin;


import com.hzit.common.result.R;
import com.hzit.mmcb.core.pojo.entity.LendReturn;
import com.hzit.mmcb.core.service.LendReturnService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 还款记录表 前端控制器
 * </p>
 *
 * @author ljh
 * @since 2024-08-27
 */
@RestController
@RequestMapping("/admin/core/lendReturn")
public class AdminLendReturnController {
    @Autowired
    private LendReturnService lendReturnService;

    /**
     * 根据标的id查询还款计划
     */

    @GetMapping("/list/{id}")
    @ApiOperation("根据标的id查询还款计划")
    public R list(@PathVariable Long id){
        List<LendReturn> list=lendReturnService.listByLendId(id);
        return R.ok().data("list",list);
    }
}

